﻿<%@ Page Language="C#" MasterPageFile="~/Web/FarmMaster.master" AutoEventWireup="true" CodeFile="ListQuestions.aspx.cs" Inherits="Web_ListQuestions" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="main">
		<div class="left">
			<div class="left1">
				<div id="PARENT">
					<ul	id="navv">
						<li class="first"><a>在线答疑</a>
						</li>
                        <li><a href="Question.aspx">在线答疑</a></li> 
                        <li><a href="ListQuestions.aspx">已有问题</a></li>
					</ul>
				</div>
			</div>
			<div class="left2" style="padding-top:13px;">
				<div class="tle">
					<span class="text1">培训通知</span>
				</div>
				<div class="tents">
					<ul style="padding-top:5px;">
                        <asp:Repeater ID="TrainRepeater" runat="server">
                            <ItemTemplate>
                                <li><a href='ViewTrain.aspx?pid=<%#Eval("ID") %>'><%#Convert.ToString(Eval("Memo")).Length > 11 ? Convert.ToString(Eval("Memo")).Substring(0, 11) + "..." : Eval("Memo")%></a></li>
                            </ItemTemplate>
                        </asp:Repeater>						
					</ul>
				</div>
			</div>
			<div class="left2">
				<div class="tle">
					<span class="text1">最新动态</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
						<asp:Repeater ID="Repeater3" runat="server">
                            <ItemTemplate>
                                <li><a href='<%=Toolkit.ApplicationRoot %>/Html/<%#Eval("url") %>'><%#Eval("Title").ToString().Length>12?Eval("Title").ToString().Substring(0,11)+"...":Eval("Title") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>
			</div>
		</div>
		<div class="right">
			<div id="SearchBox">
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="right">类别：</td>
                        <td><asp:DropDownList ID="Kind" runat="server" Width="100px" 
                                onselectedindexchanged="Kind_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList></td>
                        <td align="right">专业：</td>
                        <td><asp:DropDownList ID="Subject" runat="server" Width="100px" 
                                onselectedindexchanged="Subject_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList></td>
                        <td align="right">课程：</td>
                        <td><asp:DropDownList ID="Course" runat="server" Width="100px" 
                                onselectedindexchanged="Course_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList></td>
                        <td><asp:TextBox ID="SearchCondition" runat="server" Width="100px"></asp:TextBox></td>
                        <td><asp:Button ID="Search" runat="server" Text="查询" onclick="Search_Click" /></td>
                    </tr>
                </table>
            </div>
            <div id="QuestionContent">
                <asp:ListView ID="RecordView" runat="server">
                    <LayoutTemplate>
                        <table id="tbl1" runat="server" cellspacing="1" cellpadding="0">
                            <tr>
                                <th style="width: 80px">提问者</th>
                                <th style="width: 120px">时间</th>
                                <th style="width: 350px">问题描述</th>
                                <th style="width: 150px">类别</th>
                            </tr>
                            <tr id="itemPlaceHolder" runat="server"></tr>
                        </table>
                        <asp:DataPager ID="dp1" runat="server" PageSize="20">
                            <Fields>
                                <asp:NumericPagerField />
                            </Fields>
                        </asp:DataPager>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr id="Tr1" runat="server">
                            <td style="width: 80px"><%#Eval("Name") %></td>
                            <td style="width: 120px"><%#Eval("Time") %></td>
                            <td style="width: 350px"><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "./ViewAnswer.aspx?qid=" + Eval("ID") %>'><%#Eval("Title") %></asp:HyperLink></td>
                            <td style="width: 150px"><%#Eval("Kind") %> - <%#Eval("Subject") %> - <%#Eval("Course") %></td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
            </div><!--content-->
		</div><!--right-->
	</div>
</asp:Content>
